package DesignPatern.A13_适配器模式.QSB.A01_基本模式;

import java.util.Map;

/**
 * @Author: Du
 * @Date: 2021/8/1 11:21
 * <p>
 * 转换
 */
public class OuterUserInfo extends OuterUser implements IUserInfo
{
    private Map baseInfo = super.getUserBaseInfo();
    private Map homeInfo = super.getUserHomeInfo();
    private Map officeInfo = super.getUserOfficeInfo();
    
    @Override
    public String getName()
    {
        return (String) this.baseInfo.get("userName");
    }
    
    @Override
    public String getHomeAddress()
    {
        return (String) this.homeInfo.get("homeAddress");
    }
    
    @Override
    public String getMobileAddress()
    {
        return (String) this.baseInfo.get("mobileNumber");
    }
    
    @Override
    public String getOfficeTelNumber()
    {
        return (String) this.officeInfo.get("OfficeTelNumber");
    }
}
